import request from '@/utils/request'

//swiperlist
export function getSwiperList(data) {
	return request({
		url: '/third-api/home/swiper/list',
		'method': 'get',
		headers: {
			isToken: false
		}

	})
}
// 滑动分类和图标分类

export function getProductClass(data) {
	return request({
		url: '/third-api/home/product/class/list',
		'method': 'get',
		headers: {
			isToken: false
		}
	})
}
// 全部分类
// /third-api/home/product/class/all/list
export function getProductClassAll(data) {
	return request({
		url: '/third-api/home/product/class/all/list',
		'method': 'get',
		headers: {
			isToken: false
		}
	})
}
// 获得轮播图分页
// /app-api/hay/applet/swiper/list
export function getappSwiperList(data) {
	return request({
		url: '/app-api/hay/applet/swiper/list',
		'method': 'get',
		headers: {
			isToken: false
		}
	})
}
// 根据code获取公司公共信息 公司介绍JBCNYKJGS,基地信息：GSJDXX
// /third-api/home/get
export function getHomeInfo(data) {
	return request({
		url: '/third-api/home/get',
		'method': 'get',
		params: data,
		headers: {
			isToken: false
		}
	})
}
// @Operation(summary = "企业资讯展示 只展示前5条数据")
// @GetMapping("/company/news/limit")
// public CommonResult<List<CompanyNewsRespVO>> getCompanyNewsLimit() {
//     List<CompanyNewsDO> list = companyNewsService.getCompanyNewsLimit();
//     return success(BeanUtils.toBean(list, CompanyNewsRespVO.class));
// }
export function getCompanyNewsLimit(data) {
	return request({
		url: '/third-api/home/company/news/limit',
		'method': 'get',
		headers: {
			isToken: false
		}
	})
}
// 获得企业资讯分页
// GET
// /third-api/home/company/page
export function getCompanyPage(data) {
	return request({
		url: '/third-api/home/company/page',
		'method': 'get',
		params: data,
		headers: {
			isToken: false
		}
	})
}

// @Operation(summary = "获得企业资讯详情")
// @GetMapping("/company/news/info")
// public CommonResult<CompanyNewsRespVO> getCompanyNews(@RequestParam("id") Long id) {
//     CompanyNewsDO companyNews = companyNewsService.getCompanyNewsAndUpdatePv(id);
//     return success(BeanUtils.toBean(companyNews, CompanyNewsRespVO.class));
// }
export function getCompanyNewsInfo(data) {
	return request({
		url: '/third-api/home/company/news/info',
		'method': 'get',
		params: data,
		headers: {
			isToken: false
		}
	})
}
// 公司基地列表 分页查询复制接口复制文档复制地址
// GET
// /third-api/home/base/page
export function getBasePage(data) {
	return request({
		url: '/third-api/home/base/page',
		'method': 'get',
		params: data,
		headers: {
			isToken: false
		}
	})
}
// /product/class/buyerAndSeller/list
export function getProductClassBuyerAndSeller(data) {
	return request({
		url: '/third-api/home/product/class/buyerAndSeller/list',
		'method': 'get',
		data: data,
		headers: {
			isToken: false
		}
	})
}
// 用户是否第一次进入小程序 true第一次 false不是第一次复制接口复制文档复制地址
// POST
// /third-api/home/first/enter/applet
export function getFirstEnterApplet(data) {
	return request({
		url: '/third-api/home/first/enter/applet',
		'method': 'post',
		data: data,
		headers: {
			isToken: false
		}
	})
}
// 微信通过code获取openid复制接口复制文档复制地址
// POST
// /app-api/member/auth/weixin-mini-app-get-openid
export function getOpenid(data) {
	return request({
		url: '/app-api/member/auth/weixin-mini-app-get-openid',
		'method': 'post',
		data: data,
		headers: {
			isToken: false
		}
	})
}